<div id="content">
    <div id="title_content">Liste des images</div>
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
        <?php echo $this->session->flashdata('error'); ?>
    </div>
    <?php endif; ?>
        <form method="POST" action="<?php echo site_url('admin_client/delete_multi_client_images')?>"  onsubmit="return go();">
            <table class="list" width="100%">
                <thead>
                    <tr>
                        <th width="20px"><input type="checkbox" name="deleteall" id="deleteall"/></th>
                        <th><?php echo "Image"?></th>
                        <th><?php echo "Titre de l'image"?></th>
                        
                        <th colspan="2">Action</th>
                    </tr>
                </thead>
                <tbody>
                <?php foreach ($client_images as $aRow): 
                	
                	$image_path = './assets/client_img/thumbs/' . $aRow['image_name'];
                        if ($aRow['image_name'] != '') {
                            if (file_exists($image_path)) {
                                $image_path = base_url() . 'assets/client_img/thumbs/' . $aRow['image_name'];
                            } else {
                                $image_path = base_url() . 'assets/client_img/no_photo/no_photo.jpg';
                            }
                        }  else {
                           	$image_path = base_url() . 'assets/client_img/no_photo/no_photo.jpg';
                        }
                
                ?>
                    <tr>
                        <td width="20px"><input type="checkbox" name="delete[]" value="<?php echo $aRow['id'] ?>" class="delete" /></td>
						<td><img src="<?php echo $image_path; ?>" alt="" width="110" /></td>
                        <td><?php echo $aRow['title']; ?></td>
                        
                        <td width="30px"><a href="<?php echo site_url('admin_client/edit_client_image/' . $aRow['id']) ?>"><img src="<?php echo base_url() ?>assets/admin/images/modifier.png" alt="modifier"/></a></td>
                        <td width="30px"><a class="confirm_delete" href="<?php echo site_url('admin_client/delete_client_image/' . $aRow['id']) ?>"><img src="<?php echo base_url() ?>assets/admin/images/supprimer.png" alt="supprimer"/></a></td>
                    </tr>
                <?php endforeach; ?>
                </tbody>
            </table>
            <div class="delete_button">
                <table width="100%">
                    <tr>
                        <td align="left" width="100%"><input type="submit" value="<?php echo lang('delete')?>" name="submit" OnClick= "return confirm('Vous êtes sur?');"/></td>
                        <td align="right"><?php echo $pagination; ?></td>
                </tr>
            </table>
        </div>
        <!--END delete_button-->
    </form>
</div>
<!--END content-->
